#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <iomanip>

using namespace std;

double sqrt_binary_search(int y)
{
    double low = 0.0;
    double high = y;
    double mid;

    while (high - low > 0.00001)
    {
        mid = (low + high) / 2;
        double mid_square = mid * mid;

        if (mid_square > y) 
        {
            high = mid;
        }
        else
        {
            low = mid;
        }
    }

    return (low + high) / 2;
}

int main()
{
    int n;
    cin >> n;

    for (int i = 0; i < n; ++i)
    {
        int y;
        cin >> y;

        double result = sqrt_binary_search(y);

        cout << fixed << setprecision(3) << result << endl;
    }

    return 0;
}
